import { path } from "../../config/path";
import request from './request';

/** 获取直播uuid和token GET /common/get_uuid_token */
export async function uuid_token(body: any, options?: any) {
  return request(path + '/common/get_uuid_token', {
    method: 'GET',
    headers: {
      Authorization: localStorage.loginToken,
    },
    params: body,
    ...(options || {}),
  });
}
/** 获取直播计划列表 GET /manage/get_broadcast_plan_list */
export async function broadcast_plan_list(body: any, options?: any) {
  return request(path + '/manage/get_broadcast_plan_list', {
    method: 'GET',
    headers: {
      Authorization: localStorage.loginToken,
    },
    params: body,
    ...(options || {}),
  });
}
/** 新增/编辑直播 POST /manage/add_edit_broadcast */
export async function add_edit_broadcast(body?: any, options?: any) {
  return request(path + '/manage/add_edit_broadcast', {
    method: 'POST',
    headers: {
      Authorization: localStorage.loginToken,
    },
    data: body,
    ...(options || {}),
  });
}
/** 获取直播计划详情 GET /manage/get_broadcast_plan_info */
export async function broadcast_plan_info(body: any, options?: any) {
  return request(path + '/manage/get_broadcast_plan_info', {
    method: 'GET',
    headers: {
      Authorization: localStorage.loginToken,
    },
    params: body,
    ...(options || {}),
  });
}
/** 获取受邀直播列表 GET /manage/get_broadcast_invited_list */
export async function broadcast_invited_list(body: any, options?: any) {
  return request(path + '/manage/get_broadcast_invited_list', {
    method: 'GET',
    headers: {
      Authorization: localStorage.loginToken,
    },
    params: body,
    ...(options || {}),
  });
}
/** 开始直播 POST /manage/start_broadcast */
export async function startBroadcast(body?: any, options?: any) {
  return request(path + '/manage/start_broadcast', {
    method: 'POST',
    headers: {
      Authorization: localStorage.loginToken,
    },
    data: body,
    ...(options || {}),
  });
}
/** 开始录制 POST /manage/start_recording */
export async function startRecording(body?: any, options?: any) {
  return request(path + '/manage/start_recording', {
    method: 'POST',
    headers: {
      Authorization: localStorage.loginToken,
    },
    data: body,
    ...(options || {}),
  });
}
/** 结束录制 POST /manage/end_recording */
export async function endRecording(body?: any, options?: any) {
  return request(path + '/manage/end_recording', {
    method: 'POST',
    headers: {
      Authorization: localStorage.loginToken,
    },
    data: body,
    ...(options || {}),
  });
}
/** 查询观众详情 GET /manage/get_audience_info */
export async function audience_info(body: any, options?: any) {
  return request(path + '/manage/get_audience_info', {
    method: 'GET',
    headers: {
      Authorization: localStorage.loginToken,
    },
    params: body,
    ...(options || {}),
  });
}
/** 直播详情 GET /manage/broadcast_info */
export async function broadcast_info(body: any, options?: any) {
  return request(path + '/manage/broadcast_info', {
    method: 'GET',
    headers: {
      Authorization: localStorage.loginToken,
    },
    params: body,
    ...(options || {}),
  });
}
/** 观众入场 POST /manage/audience_join */
export async function audience_join(body?: any, options?: any) {
  return request(path + '/manage/audience_join', {
    method: 'POST',
    headers: {
      Authorization: localStorage.loginToken,
    },
    data: body,
    ...(options || {}),
  });
}
/** 观众离场 POST /manage/audience_exit */
export async function audience_exit(body?: any, options?: any) {
  return request(path + '/manage/audience_exit', {
    method: 'POST',
    headers: {
      Authorization: localStorage.loginToken,
    },
    data: body,
    ...(options || {}),
  });
}
/** 结束直播 POST /manage/end_broadcast */
export async function endBroadcast(body?: any, options?: any) {
  return request(path + '/manage/end_broadcast', {
    method: 'POST',
    headers: {
      Authorization: localStorage.loginToken,
    },
    data: body,
    ...(options || {}),
  });
}
/** 直播历史列表 GET /manage/get_broadcast_history_list */
export async function broadcast_history_list(body: any, options?: any) {
  return request(path + '/manage/get_broadcast_history_list', {
    method: 'GET',
    headers: {
      Authorization: localStorage.loginToken,
    },
    params: body,
    ...(options || {}),
  });
}
/** 直播历史详情 GET /manage/get_broadcast_history_info */
export async function broadcast_history_info(body: any, options?: any) {
  return request(path + '/manage/get_broadcast_history_info', {
    method: 'GET',
    headers: {
      Authorization: localStorage.loginToken,
    },
    params: body,
    ...(options || {}),
  });
}
/** 删除直播计划 POST /manage/delete_broadcast_plan */
export async function delete_broadcast_plan(body?: any, options?: any) {
  return request(path + '/manage/delete_broadcast_plan', {
    method: 'POST',
    headers: {
      Authorization: localStorage.loginToken,
    },
    data: body,
    ...(options || {}),
  });
}
/** 是否可以进入直播 GET /manage/entry_status */
export async function entry_status(body: any, options?: any) {
  return request(path + '/manage/entry_status', {
    method: 'GET',
    headers: {
      Authorization: localStorage.loginToken,
    },
    params: body,
    ...(options || {}),
  });
}
/** 分享页面直播详情 GET /common/get_broadcast_info */
export async function get_broadcast_info(body: any, options?: any) {
  return request(path + '/common/get_broadcast_info', {
    method: 'GET',
    headers: {
      Authorization: localStorage.loginToken,
    },
    params: body,
    ...(options || {}),
  });
}
/** 修改录制布局（直播录制 院内指导录制 远程指导录制） POST /manage/change_recording_layout */
export async function change_recording_layout(body?: any, options?: any) {
  return request(path + '/manage/change_recording_layout', {
    method: 'POST',
    headers: {
      Authorization: localStorage.loginToken,
    },
    data: body,
    ...(options || {}),
  });
}